import axios from '@/axios';

// 创建员工
export function createMember(data) {
    return axios({
        url: '/members/create-member',
        method: 'post',
        data
    })
}

// 修改员工
export function changeMember(data) {
    return axios({
        url: '/members/change-member',
        method: 'post',
        data
    })
}

// 员工列表
export function memberList(data) {
    return axios({
        url: '/members/member-list',
        method: 'post',
        data
    })
}

// 修改密码
export function setPwd(data) {
    return axios({
        url: '/members/set-pwd',
        method: 'post',
        data
    })
}

// 删除员工
export function delMember(data) {
    return axios({
        url: '/members/del-member',
        method: 'post',
        data
    })
}

// 保存部门信息
export function saveDepart(data) {
    return axios({
        url: '/depart/save-depart',
        method: 'post',
        data
    })
}

// 部门列表
export function departList(data) {
    return axios({
        url: '/depart/list',
        method: 'post',
        data
    })
}

// 删除部门
export function delDepart(data) {
    return axios({
        url: '/depart/del-depart',
        method: 'post',
        data
    })
}

// 保存角色
export function saveGroup(data) {
    return axios({
        url: '/group/save-group',
        method: 'post',
        data
    })
}

// 角色列表
export function groupList(data) {
    return axios({
        url: '/group/list',
        method: 'post',
        data
    })
}

// 删除角色
export function delGroup(data) {
    return axios({
        url: '/group/del-group',
        method: 'post',
        data
    })
}

// 所有部门下员工
export function departMember(data) {
    return axios({
        url: '/members/wu-dept',
        method: 'post',
        data
    })
}

// 角色权限列表
export function rule(data) {
    return axios({
        url: '/group/rule',
        method: 'post',
        data
    })
}

// 保存角色权限
export function saveGroupRule(data) {
    return axios({
        url: '/group/save-group-rule',
        method: 'post',
        data
    })
}

// 我的权限
export function myRule(data) {
    return axios({
        url: '/members/my-rule',
        method: 'post',
        data
    })
}

// 我的消息
export function myMsg(data) {
    return axios({
        url: '/members/my-msg',
        method: 'post',
        data
    })
}

// 消息已读
export function readMsg(data) {
    return axios({
        url: '/members/read-msg',
        method: 'post',
        data
    })
}
